home *** CD-ROM | disk | FTP | other *** search
/ Rollerball Press Kit / Rollerball Press Kit.iso / pc / savedialog.dxr / 00012_text behavior.ls < prev    next >
Encoding:
Text File  |  2002-01-09  |  1.2 KB  |  33 lines

  1. property pTotalFileSize
  2. global gMediaPath, gSourceList, gFileXtraObj
  3.  
  4. on beginSprite me
  5.   pTotalFileSize = 0
  6.   repeat with x = 1 to gSourceList.count
  7.     thisFile = gMediaPath & gSourceList[x]
  8.     n = the number of chars in thisFile
  9.     if (char n of thisFile = ":") or (char n of thisFile = "\") then
  10.       folderList = gFileXtraObj.fx_FolderToList(thisFile)
  11.       repeat with y = 1 to folderList.count
  12.         if folderList[y] contains "Icon" then
  13.           next repeat
  14.         end if
  15.         newItem = gMediaPath & gSourceList[x] & folderList[y]
  16.         tempSize = gFileXtraObj.fx_FileGetSize(newItem)
  17.         pTotalFileSize = pTotalFileSize + tempSize
  18.       end repeat
  19.       next repeat
  20.     end if
  21.     tempSize = gFileXtraObj.fx_FileGetSize(thisFile)
  22.     pTotalFileSize = pTotalFileSize + tempSize
  23.   end repeat
  24.   set the floatPrecision to 1
  25.   pTotalFileSize = float(pTotalFileSize / 1024 / 1024)
  26.   if gSourceList.count = 1 then
  27.     temp = "image,"
  28.   else
  29.     temp = "images,"
  30.   end if
  31.   put "You have selected " & string(gSourceList.count) && temp & " which will take up approximately " & string(pTotalFileSize) & " Megabytes of space on your hard drive.  Please choose from one of the save options below:" into member "SaveText"
  32. end
  33.